package com.example.jpademo.DAO;

import com.example.jpademo.Entity.Author;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

@Repository
public interface AuthorDAO extends JpaRepository<Author,Integer> {
    @Query("select s.id from Author s where s.email = ?1 and s.password = ?2")
    public Integer login(String email,String pwd);
}
